package com.itheima.canshu;

import java.util.ArrayList;
import java.util.Collections;

public class Demo1 {
    public static void main(String[] args) {
       // int sum=getSum(1,2,3,4);
        //System.out.println(sum);
        String s="helloworld";
        char[] chars = s.toCharArray();
        Character[] c=new Character[chars.length];
        for (int i = 0; i < c.length; i++) {
            c[i]=chars[i];

        }
        ArrayList<Character> list=new ArrayList<>();
        Collections.addAll(list,c);
        System.out.println(list);

    }

    private static int getSum(int...a) {
        int sum=0;
        for (int i = 0; i < a.length; i++) {
            sum+=a[i];
        }
        return sum;
    }


}
